home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / PInterfaces / Retrace.p < prev    next >
Encoding:
Text File  |  1995-07-06  |  2.8 KB  |  129 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Retrace.p
  3.  
  4.      Contains:    Vertical Retrace Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT Retrace;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __RETRACE__}
  30. {$SETC __RETRACE__ := 1}
  31.  
  32. {$I+}
  33. {$SETC RetraceIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __TYPES__}
  38. {$I Types.p}
  39. {$ENDC}
  40. {    ConditionalMacros.p                                            }
  41.  
  42. {$IFC UNDEFINED __OSUTILS__}
  43. {$I OSUtils.p}
  44. {$ENDC}
  45. {    MixedMode.p                                                    }
  46. {    Memory.p                                                    }
  47.  
  48. {$PUSH}
  49. {$ALIGN MAC68K}
  50. {$LibExport+}
  51.     
  52. TYPE
  53.     VBLTaskPtr = ^VBLTask;
  54.  
  55.     {
  56.         VBLProcPtr uses register based parameters on the 68k and cannot
  57.         be written in or called from a high-level language without the help of
  58.         mixed mode or assembly glue.
  59.  
  60.         In:
  61.          => vblTaskPtr      A0.L
  62.     }
  63.     VBLProcPtr = Register68kProcPtr;  { register PROCEDURE VBL(vblTaskPtr: VBLTaskPtr); }
  64.     VBLUPP = UniversalProcPtr;
  65.  
  66.     VBLTask = RECORD
  67.         qLink:                    QElemPtr;
  68.         qType:                    INTEGER;
  69.         vblAddr:                VBLUPP;
  70.         vblCount:                INTEGER;
  71.         vblPhase:                INTEGER;
  72.     END;
  73.  
  74. CONST
  75.     uppVBLProcInfo = $00009802; { Register PROCEDURE (4 bytes in A0); }
  76.  
  77. FUNCTION NewVBLProc(userRoutine: VBLProcPtr): VBLUPP;
  78.     {$IFC NOT GENERATINGCFM }
  79.     INLINE $2E9F;
  80.     {$ENDC}
  81.  
  82. PROCEDURE CallVBLProc(vblTaskPtr: VBLTaskPtr; userRoutine: VBLUPP);
  83.     {$IFC NOT GENERATINGCFM}
  84.     {To be implemented:  Glue to move parameters into registers.}
  85.     {$ENDC}
  86.  
  87. FUNCTION GetVBLQHdr: QHdrPtr;
  88.     {$IFC NOT GENERATINGCFM}
  89.     INLINE $2EBC, $0000, $0160;
  90.     {$ENDC}
  91. FUNCTION SlotVInstall(vblBlockPtr: QElemPtr; theSlot: INTEGER): OSErr;
  92.     {$IFC NOT GENERATINGCFM}
  93.     INLINE $301F, $205F, $A06F, $3E80;
  94.     {$ENDC}
  95. FUNCTION SlotVRemove(vblBlockPtr: QElemPtr; theSlot: INTEGER): OSErr;
  96.     {$IFC NOT GENERATINGCFM}
  97.     INLINE $301F, $205F, $A070, $3E80;
  98.     {$ENDC}
  99. FUNCTION AttachVBL(theSlot: INTEGER): OSErr;
  100.     {$IFC NOT GENERATINGCFM}
  101.     INLINE $301F, $A071, $3E80;
  102.     {$ENDC}
  103. FUNCTION DoVBLTask(theSlot: INTEGER): OSErr;
  104.     {$IFC NOT GENERATINGCFM}
  105.     INLINE $301F, $A072, $3E80;
  106.     {$ENDC}
  107. FUNCTION VInstall(vblTaskPtr: QElemPtr): OSErr;
  108.     {$IFC NOT GENERATINGCFM}
  109.     INLINE $205F, $A033, $3E80;
  110.     {$ENDC}
  111. FUNCTION VRemove(vblTaskPtr: QElemPtr): OSErr;
  112.     {$IFC NOT GENERATINGCFM}
  113.     INLINE $205F, $A034, $3E80;
  114.     {$ENDC}
  115. {}
  116. { Custom Glue for 68k.}
  117. {}
  118.  
  119. {$ALIGN RESET}
  120. {$POP}
  121.  
  122. {$SETC UsingIncludes := RetraceIncludes}
  123.  
  124. {$ENDC} {__RETRACE__}
  125.  
  126. {$IFC NOT UsingIncludes}
  127.  END.
  128. {$ENDC}
  129.